import fs from "node:fs/promises";

import { createDatabase } from "../database.js";

// 读取 sqlite schema 文件
const schema = await fs.readFile("./sql/schema-sqlite.sql", "utf8");
// 建立数据库连接
const db = await createDatabase("sqlite://todolist.db");
// 执行建表语句
db.db.exec(schema);
